Repository navigation
feat(config): route embeddings through named providers - #678
Zeming-Yuan wants to merge 2 commits into
Conversation
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; suggestions only, and they are marked inline.
The named embedding route is wired consistently through provider construction, query/write clients, the startup dimension probe, rebuild attestation, archive rebuilds, and safe config display. Endpoint provenance keeps the existing model/width refusals while treating a same-model endpoint move as the accepted persistent warning, and legacy inline configuration remains covered by the compatibility corpus. I found no weakened tests.
Covered: CLAUDE.md and all scoped .claude/rules; the feature diff and affected callers; the accepted #666 design and earlier provenance/factory history; backward compatibility and public API usage; credential isolation; LanceDB/Milvus metadata paths; and the architecture constraints. All static checks passed, including Ruff and all 14 import contracts. The focused affected suite passed 83/83. The unit run produced 5,337 passes and 4 skips, with 11 NLTK failures solely because its required downloaded data was initially absent; after installing the repository-prescribed assets, that complete module passed 15/15. Integration passed 246 with 11 skips and 6 deselections (live Milvus was unavailable). Documentation/link checks passed; Ruby was unavailable for the Makefile YAML step, and the same templates parsed successfully with installed PyYAML.
One nonblocking public-facade example correction is inline.
gloryfromca
left a comment
There was a problem hiding this comment.
No blockers; this can merge as far as I am concerned.
Reviewed the delta from 9fb75f2. It resolves the outstanding public-facade documentation mismatch consistently in the component example, architecture table, and factory contract, without changing runtime behavior or weakening tests. The prior thread is replied to and resolved.
Verification: Ruff and format checks passed for the affected component/tests; 228 named-provider compatibility and integration tests passed; documentation checks passed.
Refs #666. Follows #674.
Summary
Embedding previously built its client and startup probe from the inline
[embedding]section. A deployment using the same gateway for chat and embedding had to repeat the connection. The index recorded the model ID and vector width, so moving the same model ID to a different gateway was invisible.[embedding].provider_refnow selects one OpenAI-compatible connection for the whole index. Explicit inline credentials and URL each take precedence for their own field. Query, write, probe and rebuild use the same resolved configuration.LanceDB and Milvus record a digest of the effective endpoint alongside the model. Moving the endpoint with the same model and width allows startup and produces a persistent warning in
everos config show. A successful rebuild records the new endpoint. Existing model and width mismatches still require a rebuild. An older index can acquire its first endpoint record after a successful probe under the index lock.Area
Verification
make ci make docs-check uv run --frozen pytest -q tests/integration/test_named_embedding_provider.py uv run --frozen pytest -q tests/unit/test_config/test_documented_model_configs.py # With the CI Milvus 2.6.22 server and EVEROS_TEST_MILVUS_URI configured EVEROS_TEST_MILVUS_FULL_STARTUP=1 uv run --frozen pytest -q tests/integration/test_milvus_remote.pyLocal CI passed with 5,348 unit tests and 246 integration tests. The real Milvus run passed all 10 tests, including endpoint attestation. Documentation checks and the package build passed.
The service regression originally returned no embedding client for a named gateway. It now checks the HTTP requests from write, query and dimension probe, then reads the rebuilt index through a separate connection. The original compatibility fixture covers 102 shipped and documented configurations, both as written and with synthetic credentials.
Checklist
Notes for Reviewers
The metadata addition is backward-compatible. Reading configuration uses a bounded, read-only lookup and skips the model probe. This stage uses the existing OpenAI-compatible adapter. Presets, optional LiteLLM support and routing for other roles remain follow-up work.